﻿/**
 * Copyright (C) 2011 original author and authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NGuice.Inject
{
    /// <summary>
    /// 一个模块用于贡献配置信息，一般是被用于创建Injector的绑定接口。一个基于NGuice的应用
    /// 最终都由一系列Module集合以及启动代码组成。应用程序代码应该扩展AbstractModule抽象
    /// 类而不要直接实现此接口。另外，对于通过Configure的bindings配置，将为所有使用Provides的
    /// 元特性注释的方法创建bindings。在这些方法上可以使用scope和binding特性来配置bindings
    /// </summary>
    public interface IModule
    { 
        /// <summary>
        /// 为此模块贡献bindings和其他配置到binder中
        /// </summary>
        /// <remarks>不要直接调用此方法来安装子模块。你应该使用Binder.Install(Module),此方法可以确保Provides提供者方法被发现</remarks>
        void Configure(IBinder binder);
    }
}
